﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace KongZhiTaiTest
{
    public class RegexClass
    {
        public void GetRightWords(string strTest)
        {
            //+开头汉字或不等于+-的字符结尾，或者 以汉字开头汉字或不是加号或减号的数字结尾
            string rightPattern = @"\+[\u4e00-\u9fa5]*[^\+|-]*|^[\u4e00-\u9fa5]*[^-\+]*";
            Regex regex = new Regex(rightPattern);
            var rightStr = regex.Matches(strTest);
            List<string> rightList = new List<string>();
            foreach (var item in rightStr)
            {
                string str = item.ToString().Replace("+","");
                Console.WriteLine(str);
            }
            
        }
    }
}
